package com.app.designpatternslearn.behavior.observerpattern.code

abstract class Observer(private val subject: Subject) {

    init {
        addObserver()
    }

    private fun addObserver() {
        subject.addObserver(this)
    }

    private fun removeObserver() {
        subject.removeObserver(this)
    }

    abstract fun update()
}